package com.example.controller;/**
 * @author wangXiao
 */

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description: TODO
 * @Author wangXiao
 * @Date 2022/9/6 
 **/
//@RestController
public class KafkaController {

   // @Autowired
   // private KafkaTemplate<String,String> kafkaTemplate;

    @RequestMapping(value = "/{topic}/send",method = RequestMethod.GET)
    public void sendMeessageTotopic1(@PathVariable String topic, @RequestParam(value = "partition",defaultValue = "0") int partition) {
        System.out.println("start send message to {}"+topic);
     //   kafkaTemplate.send(topic,partition,"你","好");
    }
}